package com.das.cloudmetro.ssoserver.security.jwt;

import org.springframework.beans.factory.annotation.*;
import javax.servlet.http.*;

public class UserAuthConfig
{
    @Value("${dascloud.authrization.user.token-header:Authorization}")
    private String tokenHeader;
    @Value("${dascloud.authrization.client.id:default}")
    private String clientId;
    @Value("${dascloud.authrization.client.secret:default}")
    private String clientSecret;
    private byte[] pubKeyByte;
    
    public String getTokenHeader() {
        return this.tokenHeader;
    }
    
    public void setTokenHeader(final String tokenHeader) {
        this.tokenHeader = tokenHeader;
    }
    
    public String getToken(final HttpServletRequest request) {
        return request.getHeader(this.getTokenHeader());
    }
    
    public byte[] getPubKeyByte() {
        return this.pubKeyByte;
    }
    
    public void setPubKeyByte(final byte[] pubKeyByte) {
        this.pubKeyByte = pubKeyByte;
    }
    
    public String getClientId() {
        return this.clientId;
    }
    
    public void setClientId(final String clientId) {
        this.clientId = clientId;
    }
    
    public String getClientSecret() {
        return this.clientSecret;
    }
    
    public void setClientSecret(final String clientSecret) {
        this.clientSecret = clientSecret;
    }
}
